package com.million.cmsservice.controller;

import com.million.cmsservice.entity.CrmBanner;
import com.million.cmsservice.service.CrmBannerService;
import com.million.commonutils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: studyboy
 * @Date: 2022/4/1  11:14
 * 前台banner 显示
 */

@RestController
@RequestMapping("/cmsService/bannerFront")
public class BannerFrontController {

    @Autowired
    private CrmBannerService crmBannerService;


    //查询所有的banner
    @GetMapping("getAllBanner")
    public R getAllBanner(){
      List<CrmBanner> list =  crmBannerService.getAllBanner();
        return R.ok().data("list",list);
    }
}
